package com.uyayo.framework.web.model;

import java.util.Objects;

/**
 * Created by hfj on 2017/11/1.
 */
public class RequestInfo {
    //请求IP
    private String requestIp;
    //浏览器
    private String browser;
    //操作系统
    private String operatingSystem;

    private String deviceType;

    private String domainName;

    private String website;

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOperatingSystem() {
        return operatingSystem;
    }

    public void setOperatingSystem(String operatingSystem) {
        this.operatingSystem = operatingSystem;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDomainName() {
        return domainName;
    }

    public void setDomainName(String domainName) {
        this.domainName = domainName;
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RequestInfo that = (RequestInfo) o;
        return Objects.equals(requestIp, that.requestIp) &&
                Objects.equals(browser, that.browser) &&
                Objects.equals(operatingSystem, that.operatingSystem) &&
                Objects.equals(deviceType, that.deviceType) &&
                Objects.equals(domainName, that.domainName) &&
                Objects.equals(website, that.website);
    }

    @Override
    public int hashCode() {
        return Objects.hash(requestIp, browser, operatingSystem, deviceType, domainName, website);
    }

    @Override
    public String toString() {
        return "RequestInfo{" +
                "requestIp='" + requestIp + '\'' +
                ", browser='" + browser + '\'' +
                ", operatingSystem='" + operatingSystem + '\'' +
                ", deviceType='" + deviceType + '\'' +
                ", domainName='" + domainName + '\'' +
                ", website='" + website + '\'' +
                '}';
    }
}
